Optimal. Leaf size=162 \[ -\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \sec (c+d x)}{a-b}\right )}{2 d (n+1) (a-b)}-\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \sec (c+d x)}{a+b}\right )}{2 d (n+1) (a+b)}+\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{a d (n+1)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.18, antiderivative size = 162, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {3885, 961, 65, 831, 68} \[ -\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \sec (c+d x)}{a-b}\right )}{2 d (n+1) (a-b)}-\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {a+b \sec (c+d x)}{a+b}\right )}{2 d (n+1) (a+b)}+\frac {(a+b \sec (c+d x))^{n+1} \, _2F_1\left (1,n+1;n+2;\frac {b \sec (c+d x)}{a}+1\right )}{a d (n+1)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 68
Rule 831
Rule 961
Rule 3885
Rubi steps
\begin {align*} \int \cot (c+d x) (a+b \sec (c+d x))^n \, dx &=-\frac {b^2 \operatorname {Subst}\left (\int \frac {(a+x)^n}{x \left (b^2-x^2\right )} \, dx,x,b \sec (c+d x)\right )}{d}\\ &=-\frac {b^2 \operatorname {Subst}\left (\int \left (\frac {(a+x)^n}{b^2 x}-\frac {x (a+x)^n}{b^2 \left (-b^2+x^2\right )}\right ) \, dx,x,b \sec (c+d x)\right )}{d}\\ &=-\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n}{x} \, dx,x,b \sec (c+d x)\right )}{d}+\frac {\operatorname {Subst}\left (\int \frac {x (a+x)^n}{-b^2+x^2} \, dx,x,b \sec (c+d x)\right )}{d}\\ &=\frac {\, _2F_1\left (1,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}+\frac {\operatorname {Subst}\left (\int \left (-\frac {(a+x)^n}{2 (b-x)}+\frac {(a+x)^n}{2 (b+x)}\right ) \, dx,x,b \sec (c+d x)\right )}{d}\\ &=\frac {\, _2F_1\left (1,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}-\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n}{b-x} \, dx,x,b \sec (c+d x)\right )}{2 d}+\frac {\operatorname {Subst}\left (\int \frac {(a+x)^n}{b+x} \, dx,x,b \sec (c+d x)\right )}{2 d}\\ &=-\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \sec (c+d x)}{a-b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a-b) d (1+n)}-\frac {\, _2F_1\left (1,1+n;2+n;\frac {a+b \sec (c+d x)}{a+b}\right ) (a+b \sec (c+d x))^{1+n}}{2 (a+b) d (1+n)}+\frac {\, _2F_1\left (1,1+n;2+n;1+\frac {b \sec (c+d x)}{a}\right ) (a+b \sec (c+d x))^{1+n}}{a d (1+n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.69, size = 163, normalized size = 1.01 \[ \frac {(a+b \sec (c+d x))^n \left (-2 \, _2F_1\left (1,-n;1-n;\frac {a \cos (c+d x)}{b+a \cos (c+d x)}\right )+\, _2F_1\left (1,-n;1-n;\frac {(a+b) \cos (c+d x)}{b+a \cos (c+d x)}\right )+2^n \left (\frac {\sec ^2\left (\frac {1}{2} (c+d x)\right ) (a \cos (c+d x)+b)}{b}\right )^{-n} \, _2F_1\left (-n,-n;1-n;\frac {(b-a) \cos (c+d x) \sec ^2\left (\frac {1}{2} (c+d x)\right )}{2 b}\right )\right )}{2 d n} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.45, size = 0, normalized size = 0.00 \[ {\rm integral}\left ({\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right ), x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [F] time = 1.36, size = 0, normalized size = 0.00 \[ \int \cot \left (d x +c \right ) \left (a +b \sec \left (d x +c \right )\right )^{n}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int {\left (b \sec \left (d x + c\right ) + a\right )}^{n} \cot \left (d x + c\right )\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \mathrm {cot}\left (c+d\,x\right )\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^n \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (a + b \sec {\left (c + d x \right )}\right )^{n} \cot {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________